Gain scheduling based toolface control system for a rotary steerable drilling tool

ABSTRACT

In accordance with some embodiments of the present disclosure, systems and methods for a gain scheduling based toolface control system for a rotary steerable drilling tool are disclosed. The method includes determining a desired toolface of a drilling tool, calculating a toolface error by determining a difference between a current toolface and the desired toolface, determining a plurality of operating points of the drilling tool, selecting one of the plurality of operating points based on a current operating point of the drilling tool, determining a model based on the selection, calculating a correction to correct the toolface error, the correction based on the model, transmitting a signal to the drilling tool such that the signal adjusts the current toolface based on the correction, and drilling a wellbore with a drill bit oriented at the desired toolface.

RELATED APPLICATIONS

This application is a U.S. National Stage Application of InternationalApplication No. PCT/US2014/064850 filed Nov. 10, 2014, which designatesthe United States, and which is incorporated herein by reference in itsentirety.

TECHNICAL FIELD

The present disclosure relates generally to downhole drilling tools and,more particularly, to a gain scheduling based toolface control systemfor rotary steerable drilling tools.

BACKGROUND

Various types of downhole drilling tools including, but not limited to,rotary drill bits, reamers, core bits, and other downhole tools havebeen used to form wellbores in associated downhole formations. Examplesof such rotary drill bits include, but are not limited to, fixed cutterdrill bits, drag bits, polycrystalline diamond compact (PDC) drill bits,matrix drill bits, roller cone drill bits, rotary cone drill bits androck bits associated with forming oil and gas wells extending throughone or more downhole formations.

Conventional wellbore drilling in a controlled direction requiresmultiple mechanisms to steer drilling direction. Bottom hole assemblieshave been used and have included the drill bit, stabilizers, drillcollars, heavy weight pipe, and a positive displacement motor (mudmotor) having a bent housing. The bottom hole assembly is connected to adrill string or drill pipe extending to the surface. The assembly steersby sliding (not rotating) the assembly with the bend in the bent housingin a specific direction to cause a change in the wellbore direction. Theassembly and drill string are rotated to drill straight.

Other conventional wellbore drilling systems use rotary steerablearrangements that use deflection to point-the-bit. They may provide abottom hole assembly that may have a flexible shaft in the middle of thetool with an internal cam to bias the tool to point-the-bit.

BRIEF DESCRIPTION OF THE DRAWINGS

For a more complete understanding of the present disclosure and itsfeatures and advantages, reference is now made to the followingdescription, taken in conjunction with the accompanying drawings, inwhich:

FIG. 1A illustrates an elevation view of an example embodiment of adrilling system;

FIG. 1B illustrates a toolface angle for an example embodiment of adrilling system;

FIG. 2 illustrates a perspective view of a rotary steerable drillingsystem;

FIGS. 3A and 3B illustrate system models that describe the behavior of arotary steerable drilling system in response to system inputs anddisturbances;

FIGS. 4A-4E illustrate block diagrams of aspects of a control system fora rotary steerable drilling system that decouple nonlinearities anddisturbances;

FIGS. 5A and 5B illustrate block diagrams of aspects of a control systemfor a rotary steerable drilling system that linearize a nonlinearresponse of the drilling system;

FIG. 6 illustrates a block diagram of a control system including abackstepping based controller to control a toolface;

FIGS. 7A and 7B illustrate block diagrams of an exemplary control systemusing a set of linear systems to model the nonlinear dynamics of arotary steerable drilling system; and

FIG. 8 illustrates a block diagram of an exemplary toolface controlsystem for a logging tool.

DETAILED DESCRIPTION

A rotary steerable drilling system may be used with directional drillingsystems including steering a drill bit to drill a non-vertical wellbore.Directional drilling systems, such as a rotary steerable drillingsystem, may include systems and/or components to measure, monitor,and/or control the toolface of the drill bit. The term “toolface” mayrefer to the orientation of a reference direction on the drill string ascompared to a fixed reference, The “tooface angle” refers to the angle,measured in a plane perpendicular to the drill string axis, between thereference direction and the fixed reference, and is usually definedbetween +180 degrees and −180 degrees. For example, in a near-verticalwellbore, north may be the fixed reference. The toolface angle may bethe amount the drill string has rotated away from north and may also bereferred to as the magnetic toolface. For a more-deviated wellbore, thetop of the borehole may be the fixed reference. In such cases, thetoolface angle may be referred to as the gravity toolface, or high sidetoolface.

During drilling operations, disturbances that may cause tool rotationanomalies such as interaction with cuttings, vibrations, bit walk, bitwhirl, and bit bounce may also cause the toolface to deviate from adesired angle. When the toolface is not held constant, the wellbore maynot be smooth and the time and cost to drill the wellbore may increasedue to time spent drilling in a direction that deviates from the desireddirection and a slower drilling speed. Therefore, it may be advantageousto implement a control system as part of a rotary steerable drillingsystem that controls the toolface. Accordingly, control systems andmethods may be designed in accordance with the teachings of the presentdisclosure and may have different designs, configurations, and/orparameters according to the particular application. Embodiments of thepresent disclosure and its advantages are best understood by referringto FIGS. 1 through 8, where like numbers are used to indicate like andcorresponding parts.

FIG. 1A illustrates an elevation view of an example embodiment of adrilling system. Drilling system 100 may include well surface or wellsite 106. Various types of drilling equipment such as a rotary table,drilling fluid pumps and drilling fluid tanks (not expressly shown) maybe located at well site 106. For example, well site 106 may includedrilling rig 102 that has various characteristics and featuresassociated with a “land drilling rig.” However, downhole drilling toolsincorporating teachings of the present disclosure may be satisfactorilyused with drilling equipment located on offshore platforms, drill ships,semi-submersibles and drilling barges (not expressly shown).

Drilling system 100 may also include drill string 103 associated withdrill bit 101 that may be used to form a wide variety of wellbores orbore holes such as generally diagonal or directional wellbore 114. Theterm “directional drilling” may be used to describe drilling a wellboreor portions of a wellbore that extend at a desired angle or anglesrelative to vertical. The desired angles may be greater than normalvariations associated with vertical wellbores. Directional drilling maybe used to access multiple target reservoirs within a single wellbore114 or reach a reservoir that may be inaccessible via a verticalwellbore. Rotary steerable drilling system 123 may be used to performdirectional drilling. Rotary steerable drilling system 123 may use apoint-the-bit method to cause the direction of drill bit 101 to varyrelative to the housing of rotary steerable drilling system 123 bybending a shaft (e.g., inner shaft 208 shown in FIG. 2) running throughrotary steerable drilling system 123.

Bottom hole assembly (BHA) 120 may include a wide variety of componentsconfigured to form wellbore 114. For example, components 122 a and 122 bof BHA 120 may include, but are not limited to, drill bits (e.g., drillbit 101), coring bits, drill collars, rotary steering tools (e.g.,rotary steerable drilling system 123), directional drilling tools,downhole drilling motors, reamers, hole enlargers or stabilizers. Thenumber and types of components 122 included in BHA 120 may depend onanticipated downhole drilling conditions and the type of wellbore thatwill be formed by drill string 103 and rotary drill bit 101. BHA 120 mayalso include various types of well logging tools (not expressly shown)and other downhole tools associated with directional drilling of awellbore. Examples of logging tools and/or directional drilling toolsmay include, but are not limited to, acoustic, neutron, gamma ray,density, photoelectric, nuclear magnetic resonance, rotary steeringtools and/or any other commercially available well tool. Further, BHA120 may also include a rotary drive (not expressly shown) connected tocomponents 122 a and 122 b and which rotates at least part of drillstring 103 together with components 122 a and 122 b.

Wellbore 114 may be defined in part by casing string 110 that may extendfrom well surface 106 to a selected downhole location. Portions ofwellbore 114, as shown in FIG. 1A, that do not include casing string 110may be described as “open hole.” Various types of drilling fluid may bepumped from well surface 106 downhole through drill string 103 toattached drill bit 101. “Uphole” may be used to refer to a portion ofwellbore 114 that is closer to well surface 106 and “downhole” may beused to refer to a portion of wellbore 114 that is further from wellsurface 106 along the length of wellbore 114. In a directional wellbore,a downhole portion of wellbore 114 may not be deeper than an upholeportion of wellbore 114 The drilling fluids may be directed to flow fromdrill string 103 to respective nozzles passing through rotary drill bit101. The drilling fluid may be circulated uphole to well surface 106through annulus 108. In open hole embodiments, annulus 108 may bedefined in part by outside diameter 112 of drill string 103 and insidediameter 118 of wellbore 114. In embodiments using casing string 110,annulus 108 may be defined by outside diameter 112 of drill string 103and inside diameter 111 of casing string 110.

Drilling system 100 may also include rotary drill bit (“drill bit”) 101.Drill bit 101 may include one or more blades 126 that may be disposedoutwardly from exterior portions of rotary bit body 124 of drill bit101. Blades 126 may be any suitable type of projections extendingoutwardly from rotary bit body 124. Drill bit 101 may rotate withrespect to bit rotational axis 104 in a direction defined by directionalarrow 105. Blades 126 may include one or more cutting elements 128disposed outwardly from exterior portions of each blade 126. Blades 126may also include one or more depth of cut controllers (not expresslyshown) configured to control the depth of cut of cutting elements 128.Blades 126 may further include one or more gage pads (not expresslyshown) disposed on blades 126. Drill bit 101 may be designed and formedin accordance with teachings of the present disclosure and may have manydifferent designs, configurations, and/or dimensions according to theparticular application of drill bit 101.

Drill bit 101 may be a component of rotary steerable drilling system123, discussed in further detail in FIG. 2. Drill bit 101 may besteered, by adjusting the toolface of drill bit 101, to control thedirection of drill bit 101 to form generally directional wellbore 114.The toolface may be the angle, measured in a plane perpendicular to thedrill string axis, that is between a reference direction on the drillstring and a fixed reference and may be any angle between +180 degreesand −180 degrees. For example, in FIG. 1A, the plane perpendicular tothe drill string axis may be plane A-A. For a directional wellbore, thefixed reference may be the top of the wellbore, shown in FIG. 1B aspoint 130. The toolface may be the angle between the fixed reference andthe reference direction, e.g., the tip of drill bit 101. In FIG. 1B,toolface angle 132 is the angle between point 130, e.g., the top of thewellbore, and the tip of drill bit 101 a. In other embodiments, thefixed reference may be magnetic north, a line opposite to the directionof gravity, or any other suitable fixed reference point.

While performing a drilling operation, disturbances (e.g., vibrations,bit walk, bit bounce, the presence of formation cuttings, or any othercause of a tool rotation anomaly) may cause the toolface to deviate fromthe desired toolface input by a drilling operator, control system, or acomputer. Therefore it may be advantageous to control the toolface byincorporating a control system that compensates for disturbances actingon drill bit 101 and the dynamics of rotary steerable drilling system123 in order to maintain the desired toolface, as discussed in furtherdetail below. The control system may be located downhole, as a componentof rotary steerable drilling system 123, or may be located at wellsurface 106 and may communicate control signals to rotary steerabledrilling system 123 via drill string 103, through the drilling fluidsflowing through drill string 103, or any other suitable method forcommunicating to and from downhole tools. Rotary steerable drillingsystem 123 including a control system designed according to the presentdisclosure may improve the accuracy of steering drill bit 101 byaccounting for and mitigating the effect of downhole vibrations on thetoolface. A toolface that is closer to the planned toolface may alsoimprove the quality of wellbore 114 by preventing drill bit 101 fromdeviating from the planned toolface throughout the drilling process.Additionally, rotary steerable drilling system 123 including a controlsystem designed according to the present disclosure may improve toollife of drill bit 101 and improve drilling efficiency due to the abilityto increase the speed of drilling and decrease the cost per foot ofdrilling.

FIG. 2 illustrates a perspective view of a rotary steerable drillingsystem. Rotary steerable drilling system 200 may include shear valve202, turbine 204, housing 206, inner shaft 208, eccentric cam 210,thrust bearings 212, and drill bit 216. Housing 206 may rotate with adrill string, such as drill string 103 shown in FIG. 1A. For example,housing 206 may rotate in direction 218. To maintain a desired toolfacewhile housing 206 rotates, inner shaft 208 may rotate in the oppositedirection of, and at the same speed as, the rotation of housing 206. Forexample, inner shaft 208 may rotate in direction 220 at the same speedas housing 206 rotates in direction 218.

Shear valve 202 may be located uphole of the other components of rotarysteerable drilling system 200. Shear valve 202 may be designed to governthe flow rate of drilling fluid into turbine 204. For example, shearvalve 202 may be opened by a fractional amount such that the flow rateof drilling fluid that flows into turbine 204 increases as shear valve202 is opened. Rotary steerable drilling system 200 may contain a motor(not expressly shown) which opens and closes shear valve 202. A currentor voltage sent to the motor may change the amount that shear valve 202is opened. While in FIG. 2, rotary steerable drilling system 200includes shear valve 202, rotary steerable drilling system 200 mayinstead include any type of valve that may control the flow rate offluid into turbine 204.

The flow rate of drilling fluid into turbine 204 may create a torque torotate inner shaft 208. Changing the flow rate of the drilling fluidinto turbine 204 may change the amount of torque created by turbine 204and thus control the speed of rotation of inner shaft 208.

A set of planetary gears may couple housing 206, inner shaft 208, andthrust bearings 212. Inner shaft 208 may rotate at the same speed but inthe opposite direction of housing 206 to maintain the toolface at thedesired angle. The positioning of the planetary gears may contribute tomaintaining a toolface between +180 and −180 degrees.

Eccentric cam 210 may be designed to bend rotary steerable drillingsystem 200 to point drill bit 216. Eccentric cam 210 may be any suitablemechanism that may point drill bit 216, such as a cam, a sheave, or adisc. Thrust bearings 212 may be designed to absorb the force and torquegenerated by drill bit 216 while drill bit 216 is drilling a wellbore(e.g., wellbore 114 shown in FIG. 1A). The planetary gears may beconnected to housing 206 and inner shaft 208 to maintain drill bit 216at a desired toolface. To point and maintain drill bit 216 at aspecified toolface, the toolface may be held in a geostationary position(e.g., the toolface remains at the same angle relative to a reference inthe plane perpendicular to the drill string axis) based on the rotationof inner shaft 208 in an equal and opposite direction to the rotation ofhousing 206 with the drill string. While the toolface may begeostationary, drill bit 216 may rotate to drill a wellbore. Forexample, drill bit 216 may rotate in direction 222.

During drilling operations, housing 206 may not rotate at a constantspeed due to disturbances acting on housing 206 or on drill bit 216. Forexample, during a stick-slip situation, drill bit 216 and housing 206may rotate in a halting fashion where drill bit 216 and housing 206 stoprotating at certain times or rotate at varying speeds. As such, therotation speed of inner shaft 208 may need to be adjusted during thedrilling operation to counteract the effect of the disturbances actingon housing 206 and maintain inner shaft 208 rotating equal and oppositeof the rotation of housing 206.

Rotary steerable drilling system 200 may include a control system (notexpressly shown) to adjust the rotation of inner shaft 208 duringdrilling operations. The control system may use a model of rotarysteerable drilling system 200, as described in more detail with respectto FIGS. 3 and 4. The model may predict the behavior of rotary steerabledrilling system 200 in response to disturbances and/or inputs to rotarysteerable drilling system 200.

FIGS. 3A and 3B illustrate system models that describe the behavior of arotary steerable drilling system in response to system inputs anddisturbances. FIG. 3A illustrates a block diagram of simplified systemmodel 300 showing the inputs and outputs of each component of a rotarysteerable drilling system. A voltage may be transmitted to motor 302such that motor 302 may open shear valve 304 in response to the voltage.The opening of shear valve 304 may cause drilling fluid to flow intoturbine 306 at a flow rate determined by the amount shear valve 304 isopened. The flow rate of drilling fluid through turbine 306 may cause atorque to be produced such that the torque rotates an inner shaft.Additionally, any disturbances acting on the rotary steerable drillingsystem may be modeled and summed with the torque created by the flow ofdrilling fluid through turbine 306 to determine the total torque causinga rotation of the inner shaft. The inner shaft rotation may causeplanetary gears 308 to rotate such that the position of planetary gears308 controls the toolface.

FIG. 3B illustrates detailed system model 320 showing the inputs andoutputs of each component of an exemplary rotary steerable drillingsystem. Model 320 may model the dominant properties of the rotarysteerable drilling system. Dominant properties may include shear valveopening properties, flow rate and turbine rotation properties, thecoupling between the turbine angular velocity and the housing angularvelocity, and the effect of the coupling on the toolface. In someembodiments, model 320 may not include properties that have minimalimpact on the rotary steerable drilling system, such as the frictionaleffects in the planetary gear system and the effect of temperaturechanges on the rotary steerable drilling system.

Box 322 illustrates a saturation model that may be used to limit theinput into the rotary steerable drilling system. In FIG. 3B, the inputis illustrated as a voltage, V. In other embodiments, such asembodiments where an alternating current (AC) motor is used, the inputmay be a current, a frequency of the current, or a frequency of thevoltage. The saturation model represented by box 322 may provide a limiton the voltage that is input to a motor of a rotary steerable drillingsystem. Box 324 illustrates an example Laplace transform transferfunction model of a motor of a rotary steerable drilling system whereK_(m) represents a model constant, τ_(m) represents the time constant ofthe motor, and s represents a Laplace parameter. Box 324 models themotor response to an input voltage, such as the voltage from box 322,and the output of box 324 may be an angular velocity of the motor,ω_(m).

Box 326 illustrates a Laplace transform transfer function used tocalculate the angular displacement of the motor, θ_(m), based on theangular velocity of the motor. The calculated angular displacement ofthe motor may be an input into a model of a shear valve, as representedby box 328. The shear valve model may be used to determine thefractional valve opening, f, of the shear valve based on the angulardisplacement of the motor. The fractional shear valve opening may be avalue between zero and one, where zero indicates that the shear valve isfully closed and one indicates that the shear valve is fully open.

The fractional shear valve opening may be used to calculate the flowrate of drilling fluid through a turbine of the rotary steerabledrilling system. At multiplication operator 330, the total flow rate ofdrilling fluid into the system, Q_(total), may be multiplied by thefractional shear valve opening to determine the flow rate through theturbine of the rotary steerable drilling system, Q. Drilling fluid thatdoes not flow through the turbine may be directed downhole to the drillbit, such as drill bit 101 shown in FIG. 1A.

Box 332 represents a model of the turbine which may use the flow rate ofdrilling fluid through the turbine to calculate the torque produced bythe turbine due to the fluid flow rate. In the calculation performed inblock 332, Q is the flow rate through the turbine and c₁ is a turbineparameter. The torque produced by the turbine due to the current angularvelocity of the turbine, calculated in block 336, may be subtracted fromthe torque produced by the turbine due to the fluid flow rate, atoperator 334. In the calculation performed in block 336, ω_(t) is theangular velocity of the turbine and c₂ is a turbine parameter. Theresult of operator 334 may be the torque produced by the turbine, τ_(t).

Prior to translating the torque of the turbine into a toolface, thecharacteristics of the mechanical properties of the rotary steerabledrilling system may be modeled. At box 340, the load torques on thesystem, τ_(L), and the gear ratio of the planetary gear system, N₁, maybe modeled and may be subtracted from the torque produced by the turbineat operator 338. At box 344, the angular acceleration of the housing ofthe rotary steerable drilling system, {dot over (ω)}_(H), is combinedwith the equivalent inertia of the housing as seen from the turbine, J₂,and subtracted from the results of operator 338 at operator 342. At box348, the calculated torque from the previous steps may be incorporatedinto a model of the equivalent inertia of the turbine, inner shaft, andplanetary gears. The model may calculate the angular acceleration of theturbine, {dot over (ω)}_(t), which may be integrated by Laplacetransform transfer function in box 350 to compute the angular velocityof the turbine, ω_(t).

At box 352, the angular velocity of the turbine may be input into amodel of the planetary gear ratio where N₁ represents the gear ratio ofthe planetary gear system. The result of the modeling in box 352 may becombined at operator 354 with a model of the effect of the angularvelocity of the housing and the planetary gear ratios to determine theangular velocity of the toolface, ω_(tf). The angular velocity of thetoolface is the rate of change of the angle of the toolface over time.At box 358, the angular velocity of the toolface may be integrated, byLaplace transform transfer function, to determine the resultingtoolface, θ_(tf).

Model 320 of the rotary steerable drilling system may be used to designa control system to maintain a precise toolface. Modifications,additions, or omissions may be made to FIG. 3B without departing fromthe scope of the present disclosure. For example, the equations shown inthe boxes of FIG. 3B are for illustration only and may be modified basedon the characteristics of the rotary steerable drilling system. Anysuitable configurations of components may be used. For example, whileblock diagram 320 illustrates a rotary steerable drilling systemincluding a shear valve and fluid flow to generate torque from a singlestage turbine, alternatively an electric motor may be used to generatetorque from the turbine. Other rotary steerable drilling systemembodiments may include magnetic or electro-magnetic actuators,pneumatic actuators with single or multi-stage turbines, or hydraulicactuators with multi-stage turbines.

FIGS. 4A-4E illustrate block diagrams of aspects of a control system fora rotary steerable drilling system that decouples nonlinearities anddisturbances.

FIG. 4A illustrates a simplified block diagram of control system 400.Control system 400 may consist of block 402, which may includefeed-forward controller 404 and feedback controller 406, and block 410,including decoupling operator 412 and model inverse 414. Blocks 402 and410 may be combined with model 416 of the rotary steerable drillingsystem.

The desired toolface may be input into control system 400. Feed-forwardcontroller 404 may be used to send a command to the rotary steerabledrilling system without the command passing through feedback controller406. Feed-forward controller 404 may be used to overcome the inertia andincrease the speed of the response of the rotary steerable drillingsystem based on a property dependent on the toolface. The differencebetween the desired toolface and the actual toolface (the “toolfaceerror”) may be calculated at operator 418 and input into feedbackcontroller 406. Feedback controller 406 may generate a signal to send toa motor in a rotary steerable drilling system to cause the motor tochange the fractional opening of a shear valve and change the torque ofa turbine to cause the toolface to change, as described with respect toFIGS. 2 and 3. Feedback controller 406 may calculate the signal to sendto the motor based on what signal will cause the motor to open the shearvalve by a fractional amount that may reduce the toolface errorcalculated at operator 418. The signal generated by feedback controller406 may be combined with the signal from feed-forward controller 404 atoperator 408. The signal may be any suitable input signal for a rotarysteerable drilling system, such as voltage, current, frequency of thevoltage, or frequency of the current. The signal output from operator408 may be adjusted in block 410 to decouple the nonlinearities of therotary steerable drilling system and/or nonlinear responses todisturbances. The decoupling performed within block 410 may allow alinear feedback controller to control a nonlinear system operating in anenvironment with nonlinear disturbances by offsetting thenonlinearities. At operator 412, the signal may be summed with termsfrom a physical state feedback decoupling model and a disturbancedecoupling model. The use of decoupling models may provide a system thatmay be easier to control by creating a system that can be controlledwith a simple feedback controller. Model inverse 414 may invert theoutput of operator 412 to compute a voltage to send to model 416 of arotary steerable drilling system, such as model 320 shown in FIG. 3B.More details of control system 400 are illustrated in FIGS. 4B-4E.

FIG. 4B illustrates a detailed block diagram of a control system showingexemplary details of a control system for a motor in a rotary steerabledrilling system. The desired angular displacement of the motor, θ*_(m),may be input into control system 420. Feed-forward loop 422 may use thedesired angular displacement of the motor, a motor model constant,K_(m), and a Laplace transform transfer function to compute a voltage tosend to the motor to cause the motor to move a shear valve. Feed-forwardloop 422 may speed up the response of the motor by determining the inputvoltage to send to the motor to result in the angular displacement ofthe motor which may cause the system to have the desired toolface.

Feedback controller 424 may be a proportional controller (“Pcontroller”) which may determine a voltage to send to the motor based onthe difference between the desired angular displacement of the motor andthe actual angular displacement of the motor, θ_(m), also known as the“motor angular displacement error.” The actual angular displacement ofthe motor may be fed back to feedback controller 424 via feedback loop426. The voltage outputs from feed-forward loop 422 and feedbackcontroller 424 may be summed and input into saturation limiter 428,which may be similar to saturation limiter 322 shown in FIG. 3B. Thevoltage output from saturation limiter 322 may be transmitted to motormodel 430, which includes model 432 of the motor and Laplace transform434. Motor model 430 may be used to determine the angular displacementof the motor as a result of the input voltage. Other embodiments offeedback controller 424 may include, and are not limited to, aproportional-integral controller (“PI controller”), aproportional-differential controller (“PD controller”), or aproportional-integral-differential controller (“PID controller”).

FIG. 4C illustrates a detailed block diagram of a control system showingexemplary details of a control system for a shear valve of a rotarysteerable drilling system. At operator 442, the ratio of desired flowrate into the turbine, Q*, to the total flow rate into the rotarysteerable drilling system, Q_(total), may be computed to determine adesired fractional opening of the shear valve, f*. The desiredfractional opening of the shear valve may be input into shear valvemodel inverse 444 to determine a desired angular displacement to send toa control system of a motor (e.g., control system 420 shown in FIG. 4B)to cause the motor to open the shear valve by the desired fractionalopening amount. The output from model inverse 444 may be input intosaturation limiter 452. The output of saturation limiter 452, thedesired angular displacement of the motor, θ*_(m), may be input intomotor model 446, which may include at least a portion of the elements ofcontrol system 420 shown in FIG. 4B. Motor model 446 may output anangular displacement of the motor which may be input into shear valvemodel 448 which may determine the fractional shear valve opening basedon the angular displacement of the motor. At operator 450, thefractional shear valve opening may be multiplied by the total flow rateinto the system to obtain the flow rate into a turbine of the rotarysteerable drilling system.

FIG. 4D illustrates a detailed block diagram of a control system thatshows exemplary details of a control system for a turbine. By decouplingthe effects of one or more disturbances on the system and the physicalstate nonlinearities, the system may be controlled through the use offeedback controller 464.

The desired angular velocity of the turbine, ω_(t)*, may be input intocontrol system 460. The desired angular velocity of the turbine may beinput to feed-forward loop 462 which may take the Laplace transformtransfer function of the model of the equivalent inertia of the turbine,the inner shaft, and the planetary gears, J₁, to determine the torque ofthe turbine, τ_(t). Feedback controller 464 may determine the differencebetween the desired angular velocity of the turbine and the actualangular velocity of the turbine (the “turbine angular velocity error”)and calculate the torque of the turbine to correct the turbine angularvelocity error. Feedback controller 464 may control the response of thesystem to correct for errors in the models of the components of therotary steerable drilling system or account for system behavior that maynot have been included in a model of the system. For example, the systemmodel may not model the effect of friction in the planetary gear systemor the effect of wellbore temperature changes on the properties ofcomponents of the system. Other embodiments of feedback controller 464may include, and are not limited to, a PI controller, a PD controller,or a PID controller.

Disturbances acting on the rotary steerable drilling system may bedecoupled via disturbance decoupling models 466 and 468. Disturbancesacting on the system may include any causes of a tool rotation anomaly,such as changes in rock formation type, fluid properties, changes in theamount of cuttings near the drill bit, lateral vibrations of thehousing, drill bit walk, stick slip, bit whirl, or bit bounce. While twodecoupling models are shown in FIG. 4D, there may be more or fewerdecoupling models depending on the number of disturbances acting on thesystem and the desired accuracy of control system 460. The disturbancesmay be decoupled through estimating or measuring the nature of thedisturbance and determining the torque of the turbine that may offsetthe disturbance. For example, in disturbance decoupling model 466, theangular acceleration of the housing, which may be irregular due to stickslip, may be input into a model of the equivalent inertia of thehousing, as seen from the turbine, to determine the torque of theturbine that will offset the effect of the stick slip.

Physical state feedback loop 470 may include a component to decouple theresponse of components of the system based on inputs to the system. Forexample, the efficiency of a turbine in a rotary steerable drillingsystem may be a function of the flow rate of drilling fluid into theturbine. Physical state feedback loop 470 may model the coupling ofinputs and components to offset the coupling from the behavior of thesystem to allow control system 460 to be controlled with a feedbackcontroller. In some embodiments, the model included in physical statefeedback loop 470 may be based on estimating the parameters used tocalculate the coupling between a physical component of the system and aninput into the system. In other embodiments, the model may be based onmeasurements provided by measuring equipment on the rotary steerabledrilling system. For example, the angular velocity of the turbine andthe flow rate of drilling fluid through the turbine may be measured andused in the model in physical state feedback loop 470. Physical statefeedback loop 470 may additionally include a step to compare theestimated parameters used in the model with the recorded measurements.If the estimation deviates from the recorded measurements by more than athreshold amount, the model may be adjusted to more closely match theestimated parameters to the recorded measurements. The threshold amountmay be based on the amount of deviation that may cause control system460 to be inaccurate.

The output from feed-forward loop 462, disturbance decoupling models 466and 468, physical state feedback loop 470 and feedback controller 464may be summed at operator 472 and the resulting torque, τ*, of theturbine may be sent to model inverse 474. Model inverse 474 maycalculate a desired flow rate of drilling fluid, Q*, through the rotarysteerable drilling system to create the torque calculated at operator472. The desired flow rate may be input into shear valve model 476 whichmay include at least a portion of the elements of control system 440described in FIG. 4C. The output of shear valve model 476, the flow rateof drilling fluid into the turbine, may be sent to model 478, which mayinclude components similar to blocks 332-350 shown in FIG. 3B to obtainthe angular velocity of the turbine.

FIG. 4E illustrates a detailed block diagram of a control system thatshows exemplary details of a control system for a rotary steerabledrilling system. By decoupling the effects of one or more disturbanceson the system and the physical state nonlinearities, the system may becontrolled through the use of feedback controller 484.

The desired toolface, θ_(tf)*, may be input into control system 480. Thedesired toolface may be input to feed-forward loop 482 which may takethe Laplace transform transfer function of the gains of the feed-forwardcontroller, k₁ and k₂, to determine the torque of the turbine, τ_(t).Feedback controller 484 may determine the difference between the desiredtoolface and the actual toolface (the “toolface error”) and calculatethe torque of the turbine to correct the toolface error. Feedbackcontroller 484 may control the response of the system to correct forerrors in the models of the components of the rotary steerable drillingsystem or account for system behavior that may not have been included ina model of the system. For example, the system model may not model theeffect of friction in the planetary gear system or the effect ofwellbore temperature changes on the properties of components of thesystem. Feedback controller 484 may be any suitable type of controller,such as a P controller, a PI controller, a PD controller, or a PIDcontroller.

Physical system non-linearities and disturbances acting on the rotarysteerable drilling system may be decoupled via decoupling model 486.Non-linearities of the system may include physical non-linearitiesand/or any coupled dynamics between the housing and the turbine.Disturbances acting on the system may include any causes of a toolrotation anomaly, such as changes in rock formation type, fluidproperties, changes in the amount of cuttings near the drill bit,lateral vibrations of the housing, drill bit walk, stick slip, bitwhirl, or bit bounce. While one decoupling model is shown in FIG. 4E,there may be more decoupling models depending on the number ofdisturbances acting on the system, physical system non-linearities, andthe desired accuracy of control system 480. The decoupling may beaccomplished through estimating or measuring the nature of thedisturbance and/or non-linearities and determining the decoupling statethat may offset them. For example, in decoupling model 486, the angularvelocity of the housing, which may be coupled to the rate of change ofthe toolface through the planetary gear system, may be input into amodel of the gear ratio conversion, as seen from the turbine, todetermine the housing angular acceleration that will offset its effect.

The output from feed-forward loop 482, decoupling model 486, andfeedback controller 484 may be summed at operator 488 and the resultingstate may be sent to planetary system gear ratio model inverse 490.Model inverse 490 may calculate a desired angular velocity of theturbine, ω_(t)*. The desired angular velocity of the turbine may beinput into turbine model 492 which may include at least a portion of theelements of control system 460 described in FIG. 4D. The output ofturbine model 492, the angular velocity of the turbine, may be sent tomodel 494, which may include components similar to blocks 352-358 shownin FIG. 3B. Control systems 420, 440, 460, and 480, shown in FIGS. 4B-4Emay be combined to form a single control system for a rotary steerabledrilling system or may be used individually to improve the performanceof one or more components of the rotary steerable drilling system.

FIGS. 5A and 5B illustrate block diagrams of aspects of a nonlinearcontrol system for a rotary steerable drilling system. Due tocommunications limitations and uncertainties in the downhole conditions,measurements of the dynamics of a drill bit and other components of arotary steerable drilling system may not be available or may not bereceived by the control system in a timely manner. Therefore, a controlsystem which uses few feedback paths and does not rely on downholemeasurements may be desirable.

FIG. 5A illustrates a simplified block diagram of control system 500using nonlinear controller 502 for nonlinear physical system 504.Nonlinear feedback controller 502 may compare the toolface, which may bereceived via feedback path 506, to the desired toolface at operator 508.Nonlinear feedback controller 502 may determine an angular displacementof the motor to send to nonlinear system 504 to adjust the toolface.

In some embodiments, the toolface may be a linear function of the torqueof the turbine which may be related to the angular displacement of themotor by a one-to-one nonlinear relationship. Mapping 512 may be asimple model of a rotary steerable drilling system based on the linearrelationship between two states of the rotary steerable drilling system,such as the turbine torque and the toolface. Mapping 512 may also be asimple model of a rotary steerable drilling system based on an input tothe drilling system and a state of the drilling system. Linear feedbackcontroller 510 may be designed to control the toolface by manipulatingthe turbine torque. Linear feedback controller 510 may be any suitabletype of controller, such as a PID controller, a PI controller, a PDcontroller, or a P controller.

In operation, the variable for manipulating the toolface control may bethe angular displacement of the motor and not the turbine torque.Therefore, the design of linear feedback controller 510 may betransformed to a controller that may output an angular displacement ofthe motor. In some embodiments, the torque of the turbine and theangular displacement of the motor may have a one-to-one nonlinearrelationship that may be mapped in mapping 512. Using mapping 512, themanipulating variable (e.g., the torque of the turbine) may betransformed into the angular displacement of the motor by applyingmapping 512 to the torque of the turbine, as output from linear feedbackcontroller 510. The combination of linear feedback controller 510 andmapping 512 may form nonlinear controller 502 and the output ofnonlinear controller 502 may be the angular displacement of the motor.

FIG. 5B illustrates a detailed block diagram of a control system 520including nonlinear feedback controller 522. Nonlinear feedbackcontroller 522 may use the difference between the desired toolface andthe actual toolface (the toolface error), determined at operator 528, tocalculate a desired angular displacement of the motor, θ*_(m), to sendto the motor to correct for the toolface error. Control system 520 mayinclude PID controller 524 which may use a desired angular displacementof the motor to determine an input voltage to send to the motor. PIDcontroller 524 may output a voltage to send to the motor. In otherembodiments, PID controller 524 may output a current or a frequency tosend to the motor. Physical system 530 may be similar to the model 320shown in FIG. 3B and may receive the input voltage to the motor from PIDcontroller 524 and output the toolface that may result from the inputvoltage.

For example, the toolface angle, θ_(tf), may be regulated by adjustingthe shear valve position θ_(m). The functions of the rotary steerabledrilling system may be defined byJ ₁{dot over (ω)}_(t) =c ₁ Q ² −c ₂ω_(t) Q−τ _(d)where Q is the flow rate of the drilling fluid, ω_(t) is the angularvelocity of the turbine, J₁ is the equivalent inertia of the turbine,and c₁ and c₂ are turbine parameters. The torque of the turbine, τ_(t),the rate of change of the tool face angle, ω_(tf), and the valveposition, θ_(m), may be defined by

τ_(t) = c₁Q² − c₂ω_(t)Q$\omega_{tf} = {{N_{1}^{2}\omega_{t}} = {\overset{.}{\theta}}_{tf}}$$\theta_{m} = {\frac{\theta_{m}^{*}}{Q^{*}}Q}$where N₁ is the gear ratio of the planetary gear system, θ_(m)*is thefully open valve position, and Q* is the full input flow rate. Byrearranging the equations, the toolface angle may be governed by

${\overset{¨}{\theta}}_{tf} = {{\frac{N_{1}^{2}}{J_{1}}\tau_{t}} - {\frac{N_{1}^{2}}{J_{1}}\tau_{d}}}$Therefore, the toolface angular position is a linear function of thetorque of the turbine and a linear controller (e.g., PID controller 524)may be designed to regulate the toolface by manipulating the torque ofthe turbine. The shear valve opening may have a one-to-one mapping withthe turbine torque that may be defined byθ_(m) =f(τ_(t),ω_(t))By manipulating the torque and the angular velocity of the turbine, themanipulation variable, θ—_(m), may be calculated to regulate thetoolface.

FIG. 6 illustrates a block diagram of a control system including abackstepping based controller to control a toolface. Backstepping basedcontrol system 600 may be used to control a toolface that is a part of arotary steerable drilling system that follows a strict feedback formwhere the derivative of the states of the model depend only on thestate-of interest itself, the states prior to the state-of-interest, andone state strictly following the state-of-interest. For example, thetoolface may be based on the turbine angular velocity, which may bebased on the flow rate through the turbine, which may be based on thefractional opening of the shear valve, which may be based on the voltageinput to the motor. The function of a state of the model used to createbackstepping based control system 600 may be based on the state andtracking error values of the states prior to the state of interest.

Control system 600 may receive a desired toolface, θ_(r), and comparethe desired toolface, to the actual toolface, θ_(t), to determine thetoolface error, e₁, at operator 602. The toolface error may be sent toblock 604 where the angular velocity of the turbine that may result inthe desired toolface may be calculated. The angular velocity of theturbine may be calculated based on a function, C₁, of the toolfaceerror, the measured toolface, and the angular velocity of the housing.C₁ may be calculated bye ₁ =x ₁ −rė ₁ =N ₁ x ₂ −{dot over (r)}+N ₂ω_(H)assuming X ₁ ^(ref) =r

resulting in:

$C_{1} = {\frac{1}{2}e_{1}^{2}}$based on the value for C₁, and the constraint that the derivative of C₁is less than zero, a desired turbine speed, x₂ ^(des), may be calculatedby

$x_{2}^{des} = {{- \frac{k_{1}e_{1}}{N_{1}}} + \frac{\overset{.}{r}}{N_{1}} - \frac{N_{2}\omega_{H}}{N_{1}}}$where r is a control reference and k₁ is the control gain and may be asmall number due to a small amount of uncertainty for the staterepresented in block 604.

At operator 606, the actual angular velocity of the turbine may becompared to the calculated desired angular velocity of the turbine todetermine the turbine angular velocity error, e₂. The turbine angularvelocity error may be sent to block 608 where the desired opening angleof the shear valve may be calculated based on the function, C₂, based onthe estimated load of the housing, the angular velocity of the turbine,the toolface error and the turbine angular velocity error. The desiredopening angle of the shear valve may be the angle that results in thedesired angular velocity of the turbine. C₂ may be calculated by

$\mspace{20mu}{e_{2} = {x_{2} - \left( {\frac{- {ke}_{1}}{N_{1}} + \frac{\overset{.}{r}}{N_{1}} - \frac{N_{2}\omega_{H}}{N_{1}}} \right)}}$$\mspace{20mu}{{\overset{.}{e}}_{2} = {{\overset{.}{x}}_{2} + \frac{K_{1}{\overset{.}{e}}_{1}}{N_{1}} + \frac{\overset{¨}{r}}{N_{1}} - {\frac{N_{2}}{N_{1}}{\overset{.}{\omega}}_{H}}}}$  therefore${\overset{.}{e}}_{2} = {{\frac{C_{1}}{J_{T}}Q^{2}} - {\frac{C_{2}x_{2}}{J_{T}}Q} + \frac{\Delta}{J_{T}} - {N_{1}\tau_{L}} - {J_{{housing}\;}{\overset{¨}{\theta}}_{housing}} + \frac{k_{1}{\overset{.}{e}}_{1}}{N_{1}} - \frac{\overset{¨}{r}}{N_{1}} + \frac{N_{2}{\overset{.}{\omega}}_{H}}{N_{1}}}$where Δ is the uncertainty of the system dynamics model, may result in

$\mspace{20mu}{C_{2} = {{\frac{1}{2}e_{1}^{2}} + {\frac{1}{2}e_{2}^{2}}}}$${{\frac{C_{1}}{J_{T}}Q^{2}} - {\frac{C_{2}x_{2}}{J_{T}}Q} + \frac{\Delta}{J_{T}} - \overset{\overset{D}{︷}}{\quad{{N_{1}\tau_{L}} - {J_{housing}{\overset{¨}{\theta}}_{housing}}}} + \frac{k_{1}{\overset{.}{e}}_{1}}{N_{1}} - \frac{\overset{¨}{r}}{N_{1}} + \frac{N_{2}{\overset{.}{\omega}}_{H}}{N_{1}}} = {{- k_{2}}e_{2}}$based on the value for C₂, and the constraint that the derivative of C₂is less than zero, a desired flow rate, Q_(des), and desired shear valveopening, φ_(des), may be calculated by

$Q_{des} = \underset{\underset{M}{︸}}{\frac{\frac{C_{2}x_{2}^{des}}{J_{T}} + \sqrt{\frac{C_{2}^{2}x_{2}^{{{des}\;}^{2}}}{J_{T}^{2}} - {4{\frac{C_{1}}{J_{T}}\left\lbrack {\frac{k_{1}{\overset{.}{e}}_{1}}{N_{1}} - \frac{\overset{¨}{r}}{N_{1}} + {k_{2}e_{2}} + \frac{N_{2}{\overset{.}{\omega}}_{H}}{N_{1}} - D + {N_{1}e_{1}}} \right\rbrack}}}}{2\frac{C_{1}}{J_{T.}}}}$$\mspace{20mu}{\varphi_{Des} = {\frac{85\; Q_{Des}}{Q^{*}} = \frac{85M}{Q^{*}}}}$

At operator 610, the actual opening angle of the shear valve may becompared to the desired opening angle of the shear valve to calculatethe shear valve opening angle error, e₃. The shear valve opening angleerror may be used, in block 612, to determine the control input (e.g.,voltage) to send to the motor of rotary steerable drilling system 614 tocause the shear valve to open by the desired amount. C₃ may becalculated by

$e_{3} = {{\varphi - \varphi_{Des}} = {\varphi - \frac{85M}{Q^{*}}}}$${\overset{.}{e}}_{3} = {\overset{.}{\varphi} - \frac{85\overset{.}{M}}{Q^{*}}}$based on the equations derived above

${\overset{.}{e}}_{3} = {{{{- \frac{1}{\tau_{m}}}\varphi} + {k_{m}u} - \frac{85\overset{.}{M}}{Q^{*}}} = {{{- \frac{1}{\tau_{m}}}e_{3}} - \frac{85M}{Q^{*}\tau_{m}} + {k_{m}u} - \frac{85\overset{.}{M}}{Q^{*}}}}$resulting in

$C_{3} = {{\frac{1}{2}e_{1}^{2}} + {\frac{1}{2}e_{2}^{2}} + {\frac{1}{2}e_{3}^{2}}}$based on the value for C₃, and the constraint that the derivative of C₃is less than zero, the control input, u, may be calculated by

$u = \frac{\frac{85M}{\tau_{M}Q^{*}} + \frac{85\overset{.}{M}}{Q^{*}} - {k_{3}e_{3}}}{k_{m.}}$

The dynamics of the rotary steerable drilling system 614 may be definedby

$\left\{ {{\begin{matrix}{\begin{matrix}{{\overset{.}{x}}_{1} = {{N_{1}x_{2}} + {N_{2}\omega_{H}}}} \\{{J_{T}{\overset{.}{x}}_{2}} = {{C_{1}Q^{2}} - {C_{2}x_{2}Q} - \underset{\underset{disturbance}{︸}}{{n_{1}\tau_{L}} - {J_{housing}{\overset{¨}{\theta}}_{housing}}} + \Delta}}\end{matrix}} \\{\overset{.}{\varphi} = {{{- \frac{1}{\tau_{m}}}\varphi} + {k_{m}u}}}\end{matrix}{where}\text{:}\mspace{14mu} Q} = {\frac{1}{85}\varphi\; Q^{*}}} \right.$

where x₁ is the toolface, x₂ is the angular velocity of the turbine, N₁and N₂ are gear ratios of the planetary gear system, ω_(H) is theangular velocity of the housing, J_(T) is the inertia of the turbine, Qis the flow rate of drilling fluid through the turbine, τ_(L) is theload torque on the system, J_(housing) is the inertia of the housing,{umlaut over (θ)}_(housing) is the angular acceleration of the housing,φ is the shear valve opening angle, τ_(m) is the torque of the motor,k_(m) is a model constant, u is the control input, Δ is the uncertaintyassociated with the model equation when comparing the model with theactual physical system, and 85 is a coefficient of the shear valve. Thecoefficient of the shear valve may be any number based on thecharacteristics of the shear valve.

The control input may be calculated based on a function, C₃, of theshear valve opening angle error, the measured opening angle of the shearvalve, the desired opening angle of the shear valve, and the turbineangular velocity error. The control input to rotary steerable drillingsystem 614 may adjust the toolface to match the desired toolface.

Control system 600 may require real-time knowledge of the angularvelocity of the housing, load on the housing, measured toolface,measured angular velocity of the turbine, measured opening angle of theshear valve, and any other parameter that may be needed to perform thecalculations to back step through system 614. The real-time knowledgemay be obtained from measurements provided by sensors on rotarysteerable drilling system 614 or through the use of estimates obtainedfrom a model of rotary steerable drilling system 614.

The functions C₁, C₂, and C₃ may be a set of Lyapunov functions. Thecontrol system may calculate the result of the functions such that thederivative of each function is less than zero. The constraint may beused to consider transient control system performance and providerobustness against any uncertainties, such as modeling uncertaintiesand/or estimation uncertainties.

FIGS. 7A and 7B illustrate block diagrams of an exemplary control systemusing a set of linear systems to approximate the nonlinear dynamics of arotary steerable drilling system. In FIG. 7A, dataset 700 may includemultiple sets of operating points 702 a-702 c (“operating points 702”).Operating point sets 702 may include one or more of any suitable stateof a rotary steerable drilling system, such as system 200 shown in FIG.2, such as toolface, the angular displacement of the motor, the angularvelocity of the turbine, turbine torque, voltage, or flow rate. For eachset of operating points 702 in dataset 700, system models 704 a-704 c(“system models 704”) may be generated by linearizing the nonlinearsteerable drilling system model about the corresponding operating points702. Controllers 706 a-706 c (“controllers 706”) may be designed basedon system models 704 and may be linear controllers that control thetoolface of system models 704. Controllers 706 may be a family of linearcontrollers 706 designed to control the toolface within a specificregion of the corresponding set of operating points 702.

In FIG. 7B, control system 710 illustrates the use of dataset 700 tocontrol a rotary steerable drilling system. Control system 710 mayinclude controller look-up block 712 where control system 710 may lookup, in dataset 700, a system model 704 and controller 706, using acurrent operating point of the rotary steerable drilling system.Controller look-up block 712 may match the current operating point withan operating point 702 in dataset 700. The current operating point ofthe system may be determined by measurements provided by one or moresensors on the rotary steerable drilling system or may be estimated bystate estimator 720. Based on the matched operating point 702, controlsystem 710 may select a system model 704 and controller 706 and use theselected system model 704 and controller 706 as linear system model 718and linear controller 714, respectively, in control system 710.

Once a system model 704 and controller 706 have been selected, linearcontroller 714, which may correspond to the selected controller 706, mayreceive a desired toolface, θ_(tf)*. The desired toolface may becompared to the actual toolface to compute the toolface error.Controller 714 may generate a voltage command to send to rotarysteerable drilling system 718 to correct the toolface error. System 718may generate the toolface resulting from the input voltage.

For example, the toolface may be calculated by

θ_(tf)(s) = G₀(s) + G₁(s)V(s) + G₂(s)τ_(L)(s) + G₃(s)θ_(H)(s) where${G_{0}(s)} = \frac{N_{1}^{2}m_{0}}{s\left( {s - m_{2}} \right)}$${G_{1}(s)} = \frac{K_{m}N_{1}^{2}m_{1}}{{s^{2}\left( {s - m_{2}} \right)}\left( {{\tau_{m}s} + 1} \right)}$${G_{2}(s)} = {- \frac{\frac{N_{1}^{4}}{J\; 1}}{s\left( {s - m_{2}} \right)}}$${G_{3}(s)} = {- \frac{{\left\lbrack {{\frac{J_{2}}{J_{1}}N_{1}^{2}} + {\left( {1 - N_{1}} \right)N_{2}}} \right\rbrack s} - {\left( {1 - N_{1}} \right)N_{2}m_{2}}}{s - m_{2}}}$The variables m₀, m₁, and m₂ may be constants calculated based on theoperating point (e.g., one of operating point 702 a-702 c). If Q₀,θ_(m0), and θ_(t0) are the values of Q, θ_(m), and θ_(t) at a selectedoperating point, the values for m₀, m₁, and m₂ may be calculated by

$m_{0} = {{\frac{C_{1}Q_{0}^{2}}{J_{1}}\left( {1 - {k^{2}\theta_{m\; 0^{2}}}} \right)} - {\frac{C_{2}Q_{0}}{J_{1}}k\;\theta_{m\; 0}{\overset{.}{\theta}}_{t\; 0}}}$$m_{1} = {{\frac{C_{1}Q_{0}^{2}}{J_{1}}2{k\left( {{k\;\theta_{m\; 0}} - 1} \right)}} + {\frac{C_{2}Q_{0}}{J_{1}}k\;{\overset{.}{\theta}}_{t\; 0}}}$$m_{2} = {{- \frac{C_{1}Q_{0}^{2}}{J_{1}}}\left( {1 - {k\;\theta_{m\; 0}}} \right)}$

FIG. 8 illustrates a block diagram of an exemplary toolface controlsystem for a rotary steerable drilling tool. Toolface control system 800may be configured to perform toolface control for any suitable rotarysteerable drilling tool, such as rotary steerable drilling tool 200.Toolface control system 800 may be used to perform the steps of anycontrol system described in the present disclosure, such as controlsystem 460, control system 520, control system 600, and/or controlsystem 700 as described with respect to FIGS. 4-7, respectively.Toolface control system 800 may be located on the surface of thewellbore or may be located downhole as part of a downhole tool or partof the rotary steerable drilling system.

In some embodiments, toolface control system 800 may include toolfacecontrol module 802. Toolface control module 802 may include any suitablecomponents. For example, in some embodiments, toolface control module802 may include processor 804. Processor 804 may include, for example amicroprocessor, microcontroller, digital signal processor (DSP),application specific integrated circuit (ASIC), or any other digital oranalog circuitry configured to interpret and/or execute programinstructions and/or process data. In some embodiments, processor 804 maybe communicatively coupled to memory 806. Processor 804 may beconfigured to interpret and/or execute program instructions and/or datastored in memory 806. Program instructions or data may constituteportions of software for carrying out the design of a control system tocontrol a toolface on a rotary steerable drilling tool, as describedherein. Memory 806 may include any system, device, or apparatusconfigured to hold and/or house one or more memory modules; for example,memory 806 may include read-only memory, random access memory, solidstate memory, or disk-based memory. Each memory module may include anysystem, device or apparatus configured to retain program instructionsand/or data for a period of time (e.g., computer-readable non-transitorymedia).

Toolface control system 800 may further include rotary steerabledrilling system model 808. Rotary steerable drilling system model 808may be communicatively coupled to toolface control module 802 and mayprovide values that may be used to model the response of a rotarysteerable drilling system to an input signal (e.g., voltage) in responseto a query or call by toolface control module 802. Rotary steerabledrilling system model 808 may be implemented in any suitable manner,such as by functions, instructions, logic, or code, and may be storedin, for example, a relational database, file, application programminginterface, library, shared library, record, data structure, service,software-as-service, or any other suitable mechanism. Rotary steerabledrilling system model 808 may include code for controlling its operationsuch as functions, instructions, or logic. Rotary steerable drillingsystem model 808 may specify any suitable models that may be used tomodel the dynamics of a rotary steerable drilling system, such as amodel of a motor, a model of a shear valve, a model of a turbine, and amodel of a planetary gear system.

Toolface control system 800 may further include disturbance estimationdatabase 812. Disturbance estimation database 812 may be communicativelycoupled to toolface control module 802 and may provide estimations ofdisturbances that may act on a rotary steerable drilling system inresponse to a query or call by toolface control module 802. Disturbanceestimation database 812 may be implemented in any suitable manner, suchas by functions, instructions, logic, or code, and may be stored in, forexample, a relational database, file, application programming interface,library, shared library, record, data structure, service,software-as-service, or any other suitable mechanism. Disturbanceestimation database 812 may include code for controlling its operationsuch as functions, instructions, or logic. Disturbance estimationdatabase 812 may specify any suitable properties of the conditions in awellbore that may be used for estimating the disturbances that may acton a rotary steerable drilling system, such as the type of rock drilledby the drill bit, the drilling fluid properties, the amount of cuttingsin the wellbore, the lateral vibrations, the bit walk, bit bounce, bitwhirl, the housing speed, and/or stick slip. Although toolface controlsystem 800 is illustrated as including two databases, toolface controlsystem 800 may contain any suitable number of databases.

In some embodiments, toolface control module 802 may be configured togenerate control signals for toolface control of a rotary steerabledrilling system. For example, toolface control module 802 may beconfigured to import one or more instances of rotary steerable drillingsystem model 808, and/or one or more instances of disturbance estimationdatabase 812. Values from rotary steerable drilling system model 808,and/or disturbance estimation database 812 may be stored in memory 806.Toolface control module 802 may be further configured to cause processor804 to execute program instructions operable to generate control signalsfor toolface control for a rotary steerable drilling system. Forexample, processor 804 may, based on values in rotary steerable drillingsystem model 808 and disturbance estimation database 812, monitor thetoolface of a rotary steerable drilling system as a measured toolfaceand may determine an updated input signal to send to the rotarysteerable drilling system to correct the toolface, as discussed infurther detail with reference to FIGS. 1-7.

Toolface control module 802 may be communicatively coupled to one ormore displays 816 such that information processed by toolface controlmodule 802 (e.g., input signals for the logging tool) may be conveyed tooperators of drilling and logging equipment at the wellsite or may bedisplayed at a location offsite.

Modifications, additions, or omissions may be made to FIG. 8 withoutdeparting from the scope of the present disclosure. For example, FIG. 8shows a particular configuration of components for toolface controlsystem 800. However, any suitable configurations of components may beused. For example, components of toolface control system 800 may beimplemented either as physical or logical components. Furthermore, insome embodiments, functionality associated with components of toolfacecontrol system 800 may be implemented in special purpose circuits orcomponents. In other embodiments, functionality associated withcomponents of toolface control system 800 may be implemented in ageneral purpose circuit or components of a general purpose circuit. Forexample, components of toolface control system 800 may be implemented bycomputer program instructions.

Embodiments disclosed herein include:

A. A method of forming a wellbore including determining a desiredtoolface of a drilling tool, calculating a toolface error by determininga difference between a current toolface of the drilling tool and thedesired toolface, determining a plurality of operating points of thedrilling tool, selecting one of the plurality of operating points basedon a current operating point of the drilling tool, determining a modelbased on the selection, calculating a correction to correct the toolfaceerror, the correction based on the model, transmitting a signal to thedrilling tool such that the signal adjusts the current toolface based onthe correction, and drilling a wellbore with a drill bit oriented at thedesired toolface.

B. A non-transitory machine-readable medium including instructionsstored therein, the instructions executable by one or more processors tofacilitate performing a method of forming a wellbore, the methodcomprising determining a desired toolface of a drilling tool,calculating a toolface error by determining a difference between acurrent toolface of the drilling tool and the desired toolface,determining a plurality of operating points of the drilling tool,selecting one of the plurality of operating points based on a currentoperating point of the drilling tool, determining a model based on theselection, calculating a correction to correct the toolface error, thecorrection based on the model, transmitting a signal to the drillingtool such that the signal adjusts the current toolface based on thecorrection, and drilling a wellbore with a drill bit oriented at thedesired toolface.

C. A downhole drilling tool control system including a processor, amemory communicatively coupled to the processor with computer programinstructions stored therein, the instructions configured to, whenexecuted by the processor, cause the processor to determine a desiredtoolface of a drilling tool, calculate a toolface error by determining adifference between a current toolface of the drilling tool and thedesired toolface, determine a plurality of operating points of thedrilling tool, select one of the plurality of operating points based ona current operating point of the drilling tool, determine a model basedon the selection, calculate a correction to correct the toolface error,the correction based on the model, transmit a signal to the drillingtool such that the signal adjusts the current toolface based on thecorrection, and drill a wellbore with a drill bit oriented at thedesired toolface.

D. A drilling system including a rotary steerable drilling system, adrill string connected to the rotary steerable drilling tool, a drillbit coupled to a toolface of the rotary steerable drilling tool, and acontrol system operable to control the of a toolface of the rotarysteerable drilling tool wherein the control system controls the of thetoolface by determining a desired toolface of a drilling tool,calculating a toolface error by determining a difference between acurrent toolface of the drilling tool and the desired toolface,determining a plurality of operating points of the drilling tool,selecting one of the plurality of operating points based on a currentoperating point of the drilling tool, determining a model based on theselection, calculating a correction to correct the toolface error, thecorrection based on the model, transmitting a signal to the drillingtool such that the signal adjusts the current toolface based on thecorrection, and drilling a wellbore with a drill bit oriented at thedesired toolface.

Each of embodiments A, B, C, and D may have one or more of the followingadditional elements in any combination: Element 1: wherein at least oneof the plurality of operating points includes at least one of the statesof the drilling tool. Element 2: wherein at least one of the pluralityof operating points is used to determine a plurality of models of thedrilling tool. Element 3: wherein at least one of the plurality ofmodels is linearized around at least one of the plurality of operatingpoints. Element 4: wherein the signal is computed by a controller.Element 5: wherein the controller may be one of a plurality ofcontrollers selected based on at least one of the plurality of operatingpoints. Element 6: further comprising determining an operating point ofthe drilling tool, selecting one of a plurality of models based on thedetermination, and selecting one of a plurality of controllers based onthe selection.

Although the present disclosure has been described with severalembodiments, various changes and modifications may be suggested to oneskilled in the art. For example, although the present disclosuredescribes a rotary steerable drilling system using a motor and a shearvalve to cause the turbine to produce torque, the same principles may beused to model and control the toolface of any suitable rotary steerabledrilling tool according to the present disclosure. It is intended thatthe present disclosure encompasses such changes and modifications asfall within the scope of the appended claims.

What is claimed is:
 1. A method of forming a wellbore comprising:determining a desired toolface of a drilling tool; calculating atoolface error by determining a difference between a current toolface ofthe drilling tool and the desired toolface; determining a plurality ofoperating points of the drilling tool; generating a plurality of modelsof the drilling tool, each model corresponding to a respective one ofthe plurality of operating points of the drilling tool and linearizedabout the corresponding operating point; determining one of theplurality of operating points based on a current operating point of thedrilling tool; selecting a model from the plurality of models of thedrilling tool, the selected model corresponds to the current operatingpoint; calculating a correction to correct the toolface error, thecorrection based on the selected model; transmitting a signal to thedrilling tool such that the signal adjusts the current toolface based onthe correction; and drilling the wellbore with a drill bit oriented atthe desired toolface.
 2. The method according to claim 1, wherein atleast one of the plurality of operating points includes at least one ofthe states of the drilling tool.
 3. The method according to claim 1,wherein at least one of the plurality of operating points is used todetermine a plurality of models of the drilling tool.
 4. The methodaccording to claim 3, wherein at least one of the plurality of models islinearized around at least one of the plurality of operating points. 5.The method according to claim 1, wherein the signal is computed by acontroller.
 6. The method according to claim 5, wherein the controllermay be one of a plurality of controllers selected based on at least oneof the plurality of operating points.
 7. The method according to claim5, further comprising: determining an operating point of the drillingtool; selecting one of a plurality of models based on the determination;and selecting one of a plurality of controllers based on the selection.8. A non-transitory machine-readable medium comprising instructionsstored therein, the instructions executable by one or more processors tofacilitate performing a method of forming a wellbore, the methodcomprising: determining a desired toolface of a drilling tool;calculating a toolface error by determining a difference between acurrent toolface of the drilling tool and the desired toolface;determining a plurality of operating points of the drilling tool;generating a plurality of models of the drilling tool, each modelcorresponding to a respective one of the plurality of operating pointsof the drilling tool and linearized about the corresponding operatingpoint; determining one of the plurality of operating points based on acurrent operating point of the drilling tool; selecting a model from theplurality of models of the drilling tool, the selected model correspondsto the current operating point; calculating a correction to correct thetoolface error, the correction based on the selected model; transmittinga signal to the drilling tool such that the signal adjusts the currenttoolface based on the correction; and drilling the wellbore with a drillbit oriented at the desired toolface.
 9. The non-transitorymachine-readable medium according to claim 8, wherein at least one ofthe plurality of operating points includes at least one of the states ofthe drilling tool.
 10. The non-transitory machine-readable mediumaccording to claim 8, wherein at least one of the plurality of operatingpoints is used to determine a plurality of models of the drilling tool.11. The non-transitory machine-readable medium according to claim 10, atleast one of the plurality of models is linearized around at least oneof the plurality of operating points.
 12. The non-transitorymachine-readable medium according to claim 8, wherein the signal iscomputed by a controller.
 13. The non-transitory machine-readable mediumaccording to claim 12, wherein the controller may be one of a pluralityof controllers selected based on at least one of the plurality ofoperating points.
 14. The non-transitory machine-readable mediumaccording to claim 12, wherein the method further comprises: determiningan operating point of the drilling tool; selecting one of a plurality ofmodels based on the determination; and selecting one of a plurality ofcontrollers based on the selection.
 15. A downhole drilling tool controlsystem comprising: a processor; a memory communicatively coupled to theprocessor with computer program instructions stored therein, theinstructions configured to, when executed by the processor, cause theprocessor to: determine a desired toolface of a drilling tool; calculatea toolface error by determining a difference between a current toolfaceof the drilling tool and the desired toolface; determine a plurality ofoperating points of the drilling tool; generate a plurality of models ofthe drilling tool, each model corresponding to a respective one of theplurality of operating points of the drilling tool and linearized aboutthe corresponding operating point; determine one of the plurality ofoperating points based on a current operating point of the drillingtool; select a model from the plurality of models of the drilling tool,the selected model corresponds to the current operating point; calculatea correction to correct the toolface error, the correction based on theselected model; transmit a signal to the drilling tool such that thesignal adjusts the current toolface based on the correction; and drillthe wellbore with a drill bit oriented at the desired toolface.
 16. Thedownhole drilling tool control system according to claim 15, wherein atleast one of the plurality of operating points includes at least one ofthe states of the drilling tool.
 17. The downhole drilling tool controlsystem according to claim 15, wherein at least one of the plurality ofoperating points is used to determine a plurality of models of thedrilling tool.
 18. The downhole drilling tool control system accordingto claim 17, the instructions further configured to cause the processorto: determine an operating point of the drilling tool; select one of aplurality of models based on the determination; and select one of aplurality of controllers based on the selection.
 19. The downholedrilling tool control system according to claim 15, wherein the signalis computed by a controller.
 20. The downhole drilling tool controlsystem according to claim 19, wherein the controller may be one of aplurality of controllers selected based on at least one of the pluralityof operating points.